package com.start.autumn.check;

import com.start.autumn.base.BaseEnum;
import com.start.autumn.properties.CheckEnumProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
@EnableConfigurationProperties(CheckEnumProperties.class)
public class BaseEnumCheck {
    private static final Logger log = LoggerFactory.getLogger(BaseEnumCheck.class);

    private final CheckEnumProperties checkEnumProperties;

    public BaseEnumCheck(CheckEnumProperties checkEnumProperties) {
        this.checkEnumProperties = checkEnumProperties;
    }

    @PostConstruct
    public void checkEnum() {
        if (checkEnumProperties.isEnable()){
            log.info("自定义检查枚举规则");
        }
    }
}
